import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
import { Table } from 'antd';

@inject('AppStore')
@observer
class PromList extends Component {
  constructor(props, context) {
    super(props, context);
    this.AppStore = this.props.AppStore;
    this.state = {};
  }

  componentDidMount() {
    this.AppStore.reqString();
  }

  componentWillUnmount() {}

  get tableParam() {
    return {
      dataSource: [
        {
          key: '1',
          name: '胡彦斌',
          age: 32,
          address: '西湖区湖底公园1号',
        },
        {
          key: '2',
          name: '胡彦祖2',
          age: 42,
          address: '西湖区湖底公园1号',
        },
      ],
      columns: [
        {
          title: '姓名',
          dataIndex: 'name',
          key: 'name',
        },
        {
          title: '年龄',
          dataIndex: 'age',
          key: 'age',
        },
        {
          title: '住址',
          dataIndex: 'address',
          key: 'address',
        },
      ],
    };
  }

  render() {
    return (
      <div className="prom-list">
        <Table {...this.tableParam} />
      </div>
    );
  }
}

export default PromList;
